﻿using System;
using System.Collections.Generic;

namespace QuickModel.DoorAndWindow
{
	[Grouper(GrouperName = "DoorAndWindowFamilySymbolGrouper")]
	internal class DoorAndWindowFamilySymbolGouper : IDataGrouper
	{
		public List<RevitModelRequest> GroupData(InputRequest inputRequest)
		{
			List<RevitModelRequest> list = new List<RevitModelRequest>();
			try
			{
				DoorAndWindowFamilySymbolRequest doorAndWindowFamilySymbolRequest = inputRequest as DoorAndWindowFamilySymbolRequest;
				bool flag = doorAndWindowFamilySymbolRequest == null;
				if (flag)
				{
					return list;
				}
				foreach (DoorAndWindowConfigInfo configInfo in doorAndWindowFamilySymbolRequest.LstConfigInfo)
				{
					list.Add(new DoorAndWindowFamilySymbolRevitModelRequest
					{
						ConfigInfo = configInfo
					});
				}
			}
			catch (Exception)
			{
			}
			return list;
		}
	}
}
